import { IFeidaoAiBrowserComponent, IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

export default function tpl(fd: IFeidaoAiBrowserComponent | IFeidaoAiNodejsComponent | any) {
	return `
	<div style="padding-left:10px;">
		<span style="margin:  20px;font-size: 20px;">查询数据常见错误</span>
		<span style="color: red;">查询数据可以使用原子操作query、复杂查询complex-query、确定数据库的前提下使用SQL</span>
		<div>
			<span>表数据（关系型数据库）</span>
			<img inline src="./images/del/1.png" width=300 data-feidao-actions="click:eu-001"><img inline src="./images/del/2.png" width=300 data-feidao-actions="click:eu-001"><img inline src="./images/del/3.png" width=300 data-feidao-actions="click:eu-001">
		</div>
		<div>
			<table style="margin-top:  10px;width:  100%;">
			<thead style="background: #f4f4f4;height: 40px;margin-top: 10px;line-height:  40px;border: 1px solid #ddd;">
				<tr>
					<td style="width:  50px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">序号</td>
					<td style="width:  100px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误说明</td>
					<td style="width:  300px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误截图</td>
					<td style="width:  300px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误原因</td>
				</tr>
			</thead>
			<tbody>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">1</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">直接将服务参数msg作为查询条件</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/4.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">msg中除去传入的参数外还有两个额外参数spaceid,modelid,传入的参数key不能含有这两个key</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">2</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">查询的字段、筛选条件字段、排序字段，字段不存在表字段中</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/4.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">字段名称必须是表字段或者是as后的自定义字段名</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">3</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">筛选条件字段值与数据库该字段值类型不匹配</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/6.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">4</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">使用sql语句查询，包含中文字符</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/8.png' width=300 data-feidao-actions="click:eu-001"></td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">5</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">使用SQL语句查询分页计算错误为负数</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/7.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">分页offet的值=(页码-1)*每页显示数据条数；页码从1开始</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">6</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">使用SQL查询进行分组</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/2.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">对数据进行分组，则查询的字段必须是分组字段或者聚合函数(max,min,sum)</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">7</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">对数据模糊查询使用了正则</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/1.jpeg' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">说明当前数据库不支持正则，推荐使用like</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">8</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">数据库表名要正确</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/5.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">表名要正确</td>
				</tr>
				<tr style="height: 40px;line-height:  40px;">
					<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">9</td>
					<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">SQL查询使用in查询值为"()"</td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/query/9.png' width=300 data-feidao-actions="click:eu-001"></td>
					<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"></td>
				</tr>
			</tbody>
		</table>
		</div>
		<fd-wh000013 id='widget' header-bgc='coral' title='截图' style="width: 100%;height: 100%;display: block;top: 0px;" data-feidao-actions="fdwe-cancel:eu-002">
			<div slot='content'>
				<img src='' data-feidao-id='show-img' style="max-width: 100%;max-height: 100%;">
			</div>
			<div slot='footer'>
			</div>
		</fd-wh000013>
	</div>
	`;
}